package cn.bdqn.mall.order.service;

import cn.bdqn.mall.order.dao.OrderDao;
import cn.bdqn.mall.order.util.OrderServiceException;
import cn.bdqn.mall.pojo.Order;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
@Transactional(rollbackFor = {OrderServiceException.class})
public class OrderServiceImpl implements OrderService {
    @Resource
    private OrderDao orderDao;

    public void create(Order order) throws OrderServiceException {
        orderDao.save(order);
    }

    public Order findByOrderNo(String orderNo) throws OrderServiceException {
        return null;
    }
}
